﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FOModels.Status;
using DataAccess.Status;
using System.Data;
namespace Bussiness.Status
{
    public class StatusBLL
    {
        private StatusDAL dal;
        public StatusBLL()
        {
            dal = new StatusDAL();
        }
        public List<StatusModels> getStatus()
        {
            List<StatusModels> list = new List<StatusModels>();
            StatusModels fur;
            DataTable tb = dal.getStatus();
            if (tb != null && tb.Rows.Count > 0)
            {
                foreach (DataRow row in tb.Rows)
                {
                    fur = new StatusModels();
                    fur.StatusID = int.Parse(row[0].ToString());
                    fur.StatusName = row[1].ToString();
                    list.Add(fur);
                }
            }
            return list;
        }
    }
}
